Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add solution for task #776

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

add solution for task #776

wants to merge 7 commits into from

Conversation

BGBroth
Copy link

@BGBroth BGBroth commented Jan 11, 2025

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Hello! 😊 It looks like you've done a great job overall, but there's a small issue that needs to be addressed before we can approve the pull request. The urls.py file currently registers the MovieViewSet with the route "buses", which doesn't align with the task requirements. This should be updated to "movies" to ensure the correct functionality and meet the core requirements of the task. Once this change is made, your code should be good to go! Keep up the great work, and feel free to reach out if you need any help. 🚀

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review button in the Reviewers tab.

cinema/urls.py Outdated
from cinema.views import MovieViewSet

router = routers.DefaultRouter()
router.register("buses", MovieViewSet)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The route is registered with the name 'buses', which seems incorrect for the MovieViewSet. Consider changing 'buses' to something more appropriate like 'movies'.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on implementing the task requirements! 🎉 Your code is well-structured and aligns with the specifications. Here are a few points to consider for improvement:

  • Serializers: While your MovieSerializer is correctly implemented using the Serializer class, consider using ModelSerializer to simplify your code and maintain consistency with other serializers. This change will automatically handle the create and update methods, reducing boilerplate code.

Overall, your models, views, and URLs are well-defined and correctly implemented. Keep up the good work! Remember to review the comments to enhance your code further. This decision is made to help you move forward with your learning journey. 🚀

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

@@ -1,6 +1,6 @@
from rest_framework import serializers

from cinema.models import Movie
from cinema.models import Movie, Genre, Actor, CinemaHall


class MovieSerializer(serializers.Serializer):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using ModelSerializer for MovieSerializer to simplify the code and maintain consistency with other serializers. This will automatically handle the create and update methods and reduce boilerplate code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants